package com.example.my_flea_street.Mapper;

import com.example.my_flea_street.bean.Notice;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface NoticeMapper {
    @Select("select * from notice ORDER BY time desc")
    Page<Notice> getNotices();

    @Select("select count(*) from notice")
    int getNoticesTotal();
}
